package com.sina.finance.api.framework.dao.rowMapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import com.sina.finance.api.framework.domain.DemoOrder;
import org.springframework.jdbc.core.RowMapper;

public class DemoOrderRowMapper implements RowMapper<DemoOrder> {

	@Override
	public DemoOrder mapRow(ResultSet rs, int rowNum) throws SQLException {
		
		DemoOrder order = new DemoOrder();

		order.setOrderGUID(rs.getString("OrderGUID"));
		order.setOrderMode(rs.getString("OrderMode"));
		order.setOrderNumber(rs.getString("OrderNumber"));
		order.setTotalAmount(rs.getDouble("TotalAmount"));

		return order;
	}

}
